package com.whu.waterworks.action;

import com.opensymphony.xwork2.ActionSupport;
import com.whu.waterworks.service.WaterWorksUserService;

public class ModifyPassword extends ActionSupport{

	private static final long serialVersionUID = 863521983396692839L;
	private WaterWorksUserService waterWorksUserService;
	private String newPassword;
	private String oldPassword;
	private String secondPassword;
	private String result="error";
	
	@Override
	public String execute() throws Exception {
		if (waterWorksUserService.updateUserPassword(oldPassword, newPassword, secondPassword)) {
			result =SUCCESS;
		}  
		return SUCCESS;
	}


	public WaterWorksUserService getWaterWorksUserService() {
		return waterWorksUserService;
	}


	public void setWaterWorksUserService(WaterWorksUserService waterWorksUserService) {
		this.waterWorksUserService = waterWorksUserService;
	}


	public String getNewPassword() {
		return newPassword;
	}


	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}


	public String getOldPassword() {
		return oldPassword;
	}


	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}


	public String getSecondPassword() {
		return secondPassword;
	}


	public void setSecondPassword(String secondPassword) {
		this.secondPassword = secondPassword;
	}


	public static long getSerialversionuid() {
		return serialVersionUID;
	}


	public String getResult() {
		return result;
	}


	public void setResult(String result) {
		this.result = result;
	}
}
